home *** CD-ROM | disk | FTP | other *** search
- In article <D3t1Fn.D55@presby.edu>, astephan@presby.edu (Andrew Stephan) writes:
- > I'm having some trouble with AMOS and the manual doesn't seem to explain
- > this. Basically, I'm trying to write program code like this:
- >
- < cut - cut - cut >
-
- I'm not totaly sure bu if I'm not mistaken there is two types of if statments.
-
- There is the
-
- IF <condition> THEN <statment> [ ELSE <statement> ]
-
- and the
-
- IF <condition>
- <statements>
- [ ELSE
- <statements> ]
- ENDIF
-
- and you are not allowed to put a IF - THEN inside a IF - ENDIF
-
- The folowing part is not correct:
-
- IF a=2
- IF b=4 THEN print "A" ELSE print "B"
- ELSE
- print "C"
- ENDIF
-
- replace it with:
-
- IF a=2
- IF b=4
- print "A"
- ELSE
- print "B"
- ENDIF
- ELSE
- print "C"
- ENDIF
-
- /Daniel
-
- *----------------------------------------------+------------------------------*
- | Daniel Jönsson | "To iterate is human, |
- | Student of Computer Science and Technology | to recurse is divine" |
- | | - Unknown |
- | E-Mail: d94djo@efd.lth.se | |
- *----------------------------------------------+------------------------------*
-
-
-
-